import commonData from './commonData';
import base from './base';
export default {
  registerTypeFilter(c) {
    let arr = commonData.censusOptions;
    let resultArr = arr.filter((item) => {
      return item.value == c
    });
    if (resultArr.length > 0) {
      return resultArr[0].label
    } else {
      return '-'
    }
  },
  educationFilter(c) {
    if (c) {
      let arr = commonData.educationOptions;
      let resultArr = arr.filter((item) => {
        return item.value == c
      });
      if (resultArr.length > 0) {
        return resultArr[0].label
      } else {
        return '-'
      }
    } else {
      return '-'
    }

  },
  isPayFundFilter(c) {
    if (c == 1) {
      return "是";
    } else {
      return "否";
    }
  },
  baseFilter(val) {
    if (val) {
      return val;
    } else if (val == 0) {
      return val;
    } else {
      return "-";
    }
  },
  sexFilter(val) {
    if (val == 1) {
      return "男"
    } else if (val == 2) {
      return "女"
    } else {
      return "未知"
    }
  },
  moneyFilters(c) {
    if (c) {
      return c;
    } else {
      return 0;
    }
  },
}